<html>
<head><meta charset="utf-8"><title>Is there a way to go from TyCtxt to Lrc&lt;Session&gt;? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20a.20way.20to.20go.20from.20TyCtxt.20to.20Lrc.3CSession.3E.3F.html">Is there a way to go from TyCtxt to Lrc&lt;Session&gt;?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220158636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20a%20way%20to%20go%20from%20TyCtxt%20to%20Lrc%3CSession%3E%3F/near/220158636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20a.20way.20to.20go.20from.20TyCtxt.20to.20Lrc.3CSession.3E.3F.html#220158636">(Dec 16 2020 at 19:08)</a>:</h4>
<p>I see it has a <code>&amp;'tcx Session</code>, but I can't turn that into an Lrc because it's not owned.</p>



<a name="220158825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20a%20way%20to%20go%20from%20TyCtxt%20to%20Lrc%3CSession%3E%3F/near/220158825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20a.20way.20to.20go.20from.20TyCtxt.20to.20Lrc.3CSession.3E.3F.html#220158825">(Dec 16 2020 at 19:10)</a>:</h4>
<p>it's ok if not, I can just pass around the whole TyCtxt, but I'd prefer not to have to add lifetimes everywhere for now</p>



<a name="220158826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20a%20way%20to%20go%20from%20TyCtxt%20to%20Lrc%3CSession%3E%3F/near/220158826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20a.20way.20to.20go.20from.20TyCtxt.20to.20Lrc.3CSession.3E.3F.html#220158826">(Dec 16 2020 at 19:10)</a>:</h4>
<p>Not to my knowledge. It shouldn't be too difficult for that to happen though if you wanted to pull the changes through the compiler I would expect.</p>



<a name="220159297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20a%20way%20to%20go%20from%20TyCtxt%20to%20Lrc%3CSession%3E%3F/near/220159297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20a.20way.20to.20go.20from.20TyCtxt.20to.20Lrc.3CSession.3E.3F.html#220159297">(Dec 16 2020 at 19:15)</a>:</h4>
<p>I would rather just change this in rustdoc I think - I have to add a TyCtxt eventually, this was jsut to make the git history more managable</p>



<a name="220159344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20a%20way%20to%20go%20from%20TyCtxt%20to%20Lrc%3CSession%3E%3F/near/220159344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20a.20way.20to.20go.20from.20TyCtxt.20to.20Lrc.3CSession.3E.3F.html#220159344">(Dec 16 2020 at 19:15)</a>:</h4>
<p>and avoid having a dozen of these :(</p>
<div class="codehilite"><pre><span></span><code>error[E0106]: missing lifetime specifier
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>